package com.itheima;

import java.util.Arrays;
import java.util.Random;

public class KaoSi0203 {
    public static void main(String[] args) {
        int[] array = new int[10];
        Random r = new Random();
        for (int i = 0; i < array.length; i++) {
            int num = r.nextInt(20) + 1;
            array[i]=num;
            System.out.println(array[i]);
        }

        int[] arrayB=new int[2];
        int count =0,count1=0;
        for (int i = 0; i < array.length; i++) {
            if (array[i]%2==0){
                count++;
                arrayB[0]=count;
            }
            if (array[i]%3==0){
                count1++;
                arrayB[1]=count1;
            }
        }

        System.out.println(Arrays.toString(arrayB));

    }
}
